import request from '@/utils/request'

// 查询贷款借据列表
export function listLoanIou(query) {
  return request({
    url: '/business/LoanIou/list',
    method: 'get',
    params: query
  })
}

// 查询贷款借据详细
export function getLoanIou(id) {
  return request({
    url: '/business/LoanIou/' + id,
    method: 'get'
  })
}

// 新增贷款借据
export function addLoanIou(data) {
  return request({
    url: '/business/LoanIou',
    method: 'post',
    data: data
  })
}

// 修改贷款借据
export function updateLoanIou(data) {
  return request({
    url: '/business/LoanIou',
    method: 'put',
    data: data
  })
}

// 删除贷款借据
export function delLoanIou(id) {
  return request({
    url: '/business/LoanIou/' + id,
    method: 'delete'
  })
}

// 导出贷款借据
export function exportLoanIou(query) {
  return request({
    url: '/business/LoanIou/export',
    method: 'get',
    params: query
  })
}

// 点击查询虚拟账号
export function extMonnifyReserved(query) {
  return request({
    url: '/business/extMonnifyReserved/list',
    method: 'get',
    params: query
  })
}
// /business/extMonnifyReserved/doMonniflyFinance?loanSerialNo=借据号&accountReference=选择的虚拟账号
// 虚拟账号list
export function doMonniflyFinance(query) {
  return request({
    url: '/business/extMonnifyReserved/doMonniflyFinance',
    method: 'get',
    params: query
  })
}
